﻿using UtilsBase;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using GatewayClient.Service;
using GatewayClient.Device;
using GatewayClient.MQ;
using UtilsMQ;
using UtilsCache;
using Models.Constant;

namespace GatewayClient
{
    public static class RunOnline
    {
        public static void Run()
        {

           
            //工作 mq
            Thread MqttClientStart = new Thread(new ServiceMqttClient().start);
            MqttClientStart.Start();
         
            //////机器检测
            Thread thread2 = new Thread(new ServiceDeviceGateWay().getMachineState);
            thread2.Name = "getMachineSate";
            thread2.Start();

       
            new ServiceHandleRS485().runSerialTaskAsync();//执行485指令



            Console.WriteLine(" 线程执行完成");
         
        }
    }
}
